<?php
/**
 * Created by litong on Date: 2019/2/25 0025 上午 9:54
 */

function getConnection(){
  $host="localhost";$username="root";$password="";$dbname="php_study";
  $conn = @mysqli_connect($host,$username,$password);
  if (!$conn) {
    die('Could not connect: ' . mysqli_error($conn));
  }
  mysqli_select_db($conn,$dbname);
  return $conn;
}
